/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.designPatterns.creational.singleton.factory;

import java.util.Date;

/**
 *
 * @author Sandiso Toto
 */
public class HireDate {
    private static HireDate employmentDate;
    private Date dateEmployed = new Date();
    
    
    
    public HireDate() {
    }
    
    public synchronized static  HireDate instanceOfHireDate(){
            
        if(employmentDate == null){
            employmentDate = new HireDate();
        }
        
        return employmentDate;
    }
    
    public Date getDateEmployed(){
    return dateEmployed;
    }
    
    
}
